<?php
/*
 * 进云智能生成平台
 * [JINYUN!] (C)2001-2099 Jinyunweb.com
 * This is NOT a freeware, use is subject to license terms
 * $Id: 2017-12-13 03:39:35 apple $
 */

defined('BY_JYA') or exit('error');
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'notice';
$return=array();
//查询当前粉丝是否关注当前公众号
$fans = cfc('core')->get_fans($_SESSION['openid']);
$fansinfo = pdo_get('core_fans',array('id'=>$fans['id'],'uniacid'=>$_SESSION['uniacid']));
$follow = $fansinfo['follow'];
set_html('title','活动说明');
if($_RQ['op']=='notice'){
	if($_RQ['id']){
		$id=intval($_RQ['id']);
		$this->session('rid',$id);
	}
	$id=$this->session('rid');
	 //查询对应活动的参数
	$item=pdo_get('jy_h5game_reply',array('id'=>$id,'uniacid'=>$_SESSION['uniacid']));
	//活动奖项数据 转成数组格式
	 $awards = json_decode($item['award'],true);
	//获取当前时间
	$time = time();
	//玩家是否被拉黑
	$shielding = pdo_get('jy_h5game_fans',array('fansId'=>$fansinfo['mid'],'uniacid'=>$_SESSION['uniacid']),'shielding');
	//是否关注公众号
	//参与该活动的人数
	$playerNum = pdo_count('jy_h5game_fans',array('rid'=>$id,'uniacid'=>$_SESSION['uniacid']));
//	$return['html']='../'.ADDONS.'/jy_h5game/custom/templates/mobile/2048/index.html';
    $return['rank'] = array('action'=>'rankings','query'=>'rid='.$id,'plugin'=>'jy_h5game');
	$return['award'] = array('action'=>'award','query'=>'id='.$id,'plugin'=>'jy_h5game');
	$return['info'] = array('action'=>'info','query'=>'id='.$id,'plugin'=>'jy_h5game');	
	$return['item']=$item;
	$return['fansinfo']=$fansinfo;
	$return['playerNum']=$playerNum;
	$return['awards']=$awards;
	exi($return);
}

		
		


